Termination w.r.t. Q of the following Term Rewriting System could not be shown:

Q restricted rewrite system:
The TRS R consists of the following rules:

ap2(ap2(map, f), xs) -> ap2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
ap2(ap2(ap2(if, true), f), xs) -> null
ap2(ap2(ap2(if, null), f), xs) -> ap2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
ap2(ap2(if2, f), xs) -> ap2(ap2(map, f), ap2(dropLast, xs))
ap2(isEmpty, null) -> true
ap2(isEmpty, ap2(ap2(cons, x), xs)) -> null
ap2(last, ap2(ap2(cons, x), null)) -> x
ap2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(last, ap2(ap2(cons, y), ys))
ap2(dropLast, ap2(ap2(cons, x), null)) -> null
ap2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

Q is empty.


QTRS
  ↳ DependencyPairsProof

Q restricted rewrite system:
The TRS R consists of the following rules:

ap2(ap2(map, f), xs) -> ap2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
ap2(ap2(ap2(if, true), f), xs) -> null
ap2(ap2(ap2(if, null), f), xs) -> ap2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
ap2(ap2(if2, f), xs) -> ap2(ap2(map, f), ap2(dropLast, xs))
ap2(isEmpty, null) -> true
ap2(isEmpty, ap2(ap2(cons, x), xs)) -> null
ap2(last, ap2(ap2(cons, x), null)) -> x
ap2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(last, ap2(ap2(cons, y), ys))
ap2(dropLast, ap2(ap2(cons, x), null)) -> null
ap2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

Q is empty.

Using Dependency Pairs [1,13] we result in the following initial DP problem:
Q DP problem:
The TRS P consists of the following rules:

AP2(ap2(map, f), xs) -> AP2(ap2(if, ap2(isEmpty, xs)), f)
AP2(ap2(ap2(if, null), f), xs) -> AP2(f, ap2(last, xs))
AP2(ap2(ap2(if, null), f), xs) -> AP2(ap2(if2, f), xs)
AP2(ap2(map, f), xs) -> AP2(if, ap2(isEmpty, xs))
AP2(ap2(ap2(if, null), f), xs) -> AP2(cons, ap2(f, ap2(last, xs)))
AP2(ap2(ap2(if, null), f), xs) -> AP2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
AP2(ap2(map, f), xs) -> AP2(isEmpty, xs)
AP2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> AP2(last, ap2(ap2(cons, y), ys))
AP2(ap2(ap2(if, null), f), xs) -> AP2(last, xs)
AP2(ap2(if2, f), xs) -> AP2(dropLast, xs)
AP2(ap2(ap2(if, null), f), xs) -> AP2(if2, f)
AP2(ap2(map, f), xs) -> AP2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
AP2(ap2(if2, f), xs) -> AP2(ap2(map, f), ap2(dropLast, xs))
AP2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> AP2(dropLast, ap2(ap2(cons, y), ys))
AP2(ap2(if2, f), xs) -> AP2(map, f)
AP2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> AP2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

The TRS R consists of the following rules:

ap2(ap2(map, f), xs) -> ap2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
ap2(ap2(ap2(if, true), f), xs) -> null
ap2(ap2(ap2(if, null), f), xs) -> ap2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
ap2(ap2(if2, f), xs) -> ap2(ap2(map, f), ap2(dropLast, xs))
ap2(isEmpty, null) -> true
ap2(isEmpty, ap2(ap2(cons, x), xs)) -> null
ap2(last, ap2(ap2(cons, x), null)) -> x
ap2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(last, ap2(ap2(cons, y), ys))
ap2(dropLast, ap2(ap2(cons, x), null)) -> null
ap2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.

↳ QTRS
  ↳ DependencyPairsProof
QDP
      ↳ DependencyGraphProof

Q DP problem:
The TRS P consists of the following rules:

AP2(ap2(map, f), xs) -> AP2(ap2(if, ap2(isEmpty, xs)), f)
AP2(ap2(ap2(if, null), f), xs) -> AP2(f, ap2(last, xs))
AP2(ap2(ap2(if, null), f), xs) -> AP2(ap2(if2, f), xs)
AP2(ap2(map, f), xs) -> AP2(if, ap2(isEmpty, xs))
AP2(ap2(ap2(if, null), f), xs) -> AP2(cons, ap2(f, ap2(last, xs)))
AP2(ap2(ap2(if, null), f), xs) -> AP2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
AP2(ap2(map, f), xs) -> AP2(isEmpty, xs)
AP2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> AP2(last, ap2(ap2(cons, y), ys))
AP2(ap2(ap2(if, null), f), xs) -> AP2(last, xs)
AP2(ap2(if2, f), xs) -> AP2(dropLast, xs)
AP2(ap2(ap2(if, null), f), xs) -> AP2(if2, f)
AP2(ap2(map, f), xs) -> AP2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
AP2(ap2(if2, f), xs) -> AP2(ap2(map, f), ap2(dropLast, xs))
AP2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> AP2(dropLast, ap2(ap2(cons, y), ys))
AP2(ap2(if2, f), xs) -> AP2(map, f)
AP2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> AP2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

The TRS R consists of the following rules:

ap2(ap2(map, f), xs) -> ap2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
ap2(ap2(ap2(if, true), f), xs) -> null
ap2(ap2(ap2(if, null), f), xs) -> ap2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
ap2(ap2(if2, f), xs) -> ap2(ap2(map, f), ap2(dropLast, xs))
ap2(isEmpty, null) -> true
ap2(isEmpty, ap2(ap2(cons, x), xs)) -> null
ap2(last, ap2(ap2(cons, x), null)) -> x
ap2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(last, ap2(ap2(cons, y), ys))
ap2(dropLast, ap2(ap2(cons, x), null)) -> null
ap2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The approximation of the Dependency Graph [13,14,18] contains 3 SCCs with 10 less nodes.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
QDP
            ↳ QDPOrderProof
          ↳ QDP
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AP2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> AP2(dropLast, ap2(ap2(cons, y), ys))

The TRS R consists of the following rules:

ap2(ap2(map, f), xs) -> ap2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
ap2(ap2(ap2(if, true), f), xs) -> null
ap2(ap2(ap2(if, null), f), xs) -> ap2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
ap2(ap2(if2, f), xs) -> ap2(ap2(map, f), ap2(dropLast, xs))
ap2(isEmpty, null) -> true
ap2(isEmpty, ap2(ap2(cons, x), xs)) -> null
ap2(last, ap2(ap2(cons, x), null)) -> x
ap2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(last, ap2(ap2(cons, y), ys))
ap2(dropLast, ap2(ap2(cons, x), null)) -> null
ap2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


AP2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> AP2(dropLast, ap2(ap2(cons, y), ys))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial Order [17,21] with Interpretation:

POL( dropLast ) = 1


POL( ap2(x1, x2) ) = x1 + 3x2 + 3


POL( AP2(x1, x2) ) = max{0, 2x2 - 3}


POL( cons ) = 3



The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

ap2(ap2(map, f), xs) -> ap2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
ap2(ap2(ap2(if, true), f), xs) -> null
ap2(ap2(ap2(if, null), f), xs) -> ap2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
ap2(ap2(if2, f), xs) -> ap2(ap2(map, f), ap2(dropLast, xs))
ap2(isEmpty, null) -> true
ap2(isEmpty, ap2(ap2(cons, x), xs)) -> null
ap2(last, ap2(ap2(cons, x), null)) -> x
ap2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(last, ap2(ap2(cons, y), ys))
ap2(dropLast, ap2(ap2(cons, x), null)) -> null
ap2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
QDP
            ↳ QDPOrderProof
          ↳ QDP

Q DP problem:
The TRS P consists of the following rules:

AP2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> AP2(last, ap2(ap2(cons, y), ys))

The TRS R consists of the following rules:

ap2(ap2(map, f), xs) -> ap2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
ap2(ap2(ap2(if, true), f), xs) -> null
ap2(ap2(ap2(if, null), f), xs) -> ap2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
ap2(ap2(if2, f), xs) -> ap2(ap2(map, f), ap2(dropLast, xs))
ap2(isEmpty, null) -> true
ap2(isEmpty, ap2(ap2(cons, x), xs)) -> null
ap2(last, ap2(ap2(cons, x), null)) -> x
ap2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(last, ap2(ap2(cons, y), ys))
ap2(dropLast, ap2(ap2(cons, x), null)) -> null
ap2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


AP2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> AP2(last, ap2(ap2(cons, y), ys))
The remaining pairs can at least be oriented weakly.
none
Used ordering: Polynomial Order [17,21] with Interpretation:

POL( last ) = 1


POL( ap2(x1, x2) ) = x1 + 3x2 + 3


POL( AP2(x1, x2) ) = max{0, 2x2 - 3}


POL( cons ) = 3



The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP
                ↳ PisEmptyProof
          ↳ QDP

Q DP problem:
P is empty.
The TRS R consists of the following rules:

ap2(ap2(map, f), xs) -> ap2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
ap2(ap2(ap2(if, true), f), xs) -> null
ap2(ap2(ap2(if, null), f), xs) -> ap2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
ap2(ap2(if2, f), xs) -> ap2(ap2(map, f), ap2(dropLast, xs))
ap2(isEmpty, null) -> true
ap2(isEmpty, ap2(ap2(cons, x), xs)) -> null
ap2(last, ap2(ap2(cons, x), null)) -> x
ap2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(last, ap2(ap2(cons, y), ys))
ap2(dropLast, ap2(ap2(cons, x), null)) -> null
ap2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
The TRS P is empty. Hence, there is no (P,Q,R) chain.

↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
QDP
            ↳ QDPOrderProof

Q DP problem:
The TRS P consists of the following rules:

AP2(ap2(ap2(if, null), f), xs) -> AP2(f, ap2(last, xs))
AP2(ap2(map, f), xs) -> AP2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
AP2(ap2(ap2(if, null), f), xs) -> AP2(ap2(if2, f), xs)
AP2(ap2(if2, f), xs) -> AP2(ap2(map, f), ap2(dropLast, xs))

The TRS R consists of the following rules:

ap2(ap2(map, f), xs) -> ap2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
ap2(ap2(ap2(if, true), f), xs) -> null
ap2(ap2(ap2(if, null), f), xs) -> ap2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
ap2(ap2(if2, f), xs) -> ap2(ap2(map, f), ap2(dropLast, xs))
ap2(isEmpty, null) -> true
ap2(isEmpty, ap2(ap2(cons, x), xs)) -> null
ap2(last, ap2(ap2(cons, x), null)) -> x
ap2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(last, ap2(ap2(cons, y), ys))
ap2(dropLast, ap2(ap2(cons, x), null)) -> null
ap2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.
We use the reduction pair processor [13].


The following pairs can be oriented strictly and are deleted.


AP2(ap2(ap2(if, null), f), xs) -> AP2(f, ap2(last, xs))
The remaining pairs can at least be oriented weakly.

AP2(ap2(map, f), xs) -> AP2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
AP2(ap2(ap2(if, null), f), xs) -> AP2(ap2(if2, f), xs)
AP2(ap2(if2, f), xs) -> AP2(ap2(map, f), ap2(dropLast, xs))
Used ordering: Polynomial Order [17,21] with Interpretation:

POL( if2 ) = max{0, -2}


POL( dropLast ) = max{0, -3}


POL( true ) = max{0, -3}


POL( last ) = 2


POL( AP2(x1, x2) ) = 2x1 + 2


POL( if ) = 1


POL( map ) = max{0, -3}


POL( null ) = 2


POL( ap2(x1, x2) ) = 2x2 + 3


POL( isEmpty ) = 0


POL( cons ) = max{0, -3}



The following usable rules [14] were oriented: none



↳ QTRS
  ↳ DependencyPairsProof
    ↳ QDP
      ↳ DependencyGraphProof
        ↳ AND
          ↳ QDP
          ↳ QDP
          ↳ QDP
            ↳ QDPOrderProof
QDP

Q DP problem:
The TRS P consists of the following rules:

AP2(ap2(map, f), xs) -> AP2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
AP2(ap2(ap2(if, null), f), xs) -> AP2(ap2(if2, f), xs)
AP2(ap2(if2, f), xs) -> AP2(ap2(map, f), ap2(dropLast, xs))

The TRS R consists of the following rules:

ap2(ap2(map, f), xs) -> ap2(ap2(ap2(if, ap2(isEmpty, xs)), f), xs)
ap2(ap2(ap2(if, true), f), xs) -> null
ap2(ap2(ap2(if, null), f), xs) -> ap2(ap2(cons, ap2(f, ap2(last, xs))), ap2(ap2(if2, f), xs))
ap2(ap2(if2, f), xs) -> ap2(ap2(map, f), ap2(dropLast, xs))
ap2(isEmpty, null) -> true
ap2(isEmpty, ap2(ap2(cons, x), xs)) -> null
ap2(last, ap2(ap2(cons, x), null)) -> x
ap2(last, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(last, ap2(ap2(cons, y), ys))
ap2(dropLast, ap2(ap2(cons, x), null)) -> null
ap2(dropLast, ap2(ap2(cons, x), ap2(ap2(cons, y), ys))) -> ap2(ap2(cons, x), ap2(dropLast, ap2(ap2(cons, y), ys)))

Q is empty.
We have to consider all minimal (P,Q,R)-chains.